package memberrewards.entities;

import java.io.Serializable;

import javax.persistence.Embeddable;
@Embeddable
public class AdditionalInfoPK implements Serializable {

	private static final long serialVersionUID = 1L;
	private String pan;
	private String additionalInfoId;
	private String additionalInfoDescription;
	
	public AdditionalInfoPK(){
		
	}
	public String getPan() {
		return pan;
	}
	public void setPan(String pan) {
		this.pan = pan;
	}
	public String getAdditionalInfoId() {
		return additionalInfoId;
	}
	public void setAdditionalInfoId(String additionalInfoId) {
		this.additionalInfoId = additionalInfoId;
	}
	public String getAdditionalInfoDescription() {
		return additionalInfoDescription;
	}
	public void setAdditionalInfoDescription(String additionalInfoDescription) {
		this.additionalInfoDescription = additionalInfoDescription;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime
				* result
				+ ((additionalInfoDescription == null) ? 0
						: additionalInfoDescription.hashCode());
		result = prime
				* result
				+ ((additionalInfoId == null) ? 0 : additionalInfoId.hashCode());
		result = prime * result + ((pan == null) ? 0 : pan.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		AdditionalInfoPK other = (AdditionalInfoPK) obj;
		if (additionalInfoDescription == null) {
			if (other.additionalInfoDescription != null)
				return false;
		} else if (!additionalInfoDescription
				.equals(other.additionalInfoDescription))
			return false;
		if (additionalInfoId == null) {
			if (other.additionalInfoId != null)
				return false;
		} else if (!additionalInfoId.equals(other.additionalInfoId))
			return false;
		if (pan == null) {
			if (other.pan != null)
				return false;
		} else if (!pan.equals(other.pan))
			return false;
		return true;
	}
	
}
